---
title: Enable event dragging/resizing
description: You can drag events to other days and resize the end date
layout: demo-v4
plugins: [ interaction, daygrid, timegrid ]
---
<script>

  document.addEventListener('DOMContentLoaded', function() {
    var calendarEl = document.getElementById('calendar');

    var calendar = new FullCalendar.Calendar(calendarEl, {
      plugins: [ 'interaction', 'dayGrid', 'timeGrid' ],
      timeZone: 'UTC',
      header: {
        left: 'prev,next today',
        center: 'title',
        right: 'dayGridMonth,timeGridWeek,timeGridDay'
      },
      editable: true,
      eventLimit: true, // when too many events in a day, show the popover
      events: '{{ site.data.demo_feed_baseurl }}/demo-events.json?overload-day'
    });

    calendar.render();
  });

</script>
